import java.io.*;

public class Crypto {
	public static void main(String[] args) {
		int i = 0;
		char flag;
		String arg;
		while ((i < args.length) && args[i].startsWith("-")) {
			arg = args[i++];
			for (int j = 0; j < arg.length(); j++) {
				flag = arg.charAt(j);
				switch (flag) {
					case 'p':
						PadGenerator p = new PadGenerator(args[i++]);
						p.generatePads();
						break;
					case 'e':
						Encrypter e = new Encrypter(args[i++]);
						e.encrypt();
						break;
					case 'd':
						Decrypter d = new Decrypter(args[i++]);
						d.decrypt();
						break;
					case 'r':
						System.out.println("retrieving pads");
						/*
                            RecoverPads r = new RecoverPads(args[i++]);
                            for 1..16
                                j = 0
                                for 1..i
                                    tempFileList = 
                                    CryptAnalyzer[i];
                                end
                        */
//						String param2 = "";
//						for (int m = 1; m <= 1018; m++) {
//							param2 += "c" + m + ".txt";
//							if (m != 1018) {
//								param2 += ",";
//							}
//						}
//                        CryptAnalyzer a = new CryptAnalyzer(param2);
                        CryptAnalyzer a = new CryptAnalyzer(args[i++]);
                        a.retrievePads();
						break;
					default:
						break;
				}
			}
		}
	}
}
